

/**
 * @author Yellow
 * This class is used to store student's information.
 */
public class Student {
	private String id;
	private String name;
	private ExamPaper examPaper;
	


	/**
	 * @param id
	 * @param name
	 */
	public Student(String id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	/**
	 * @return the student's id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @return the student's name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the examPaper
	 */
	public ExamPaper getExamPaper() {
		return examPaper;
	}

	/**
	 * @param examPaper the examPaper to set
	 */
	public void setExamPaper(ExamPaper examPaper) {
		this.examPaper = examPaper;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Student other = (Student) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return id + "_" + name;
	}
	
}
